# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=elf_diff
pkgver=0.6.0
pkgrel=3
pkgdesc="Tool to compare ELF binaries"
url="https://github.com/noseglasses/elf_diff"
arch="noarch !s390x" # py3-progressbar2
license="GPL-3.0-only"
depends="
	py3-anytree
	py3-beautifulsoup4
	py3-deepdiff
	py3-dict2xml
	py3-gitpython
	py3-jinja2
	py3-progressbar2
	py3-yaml
	python3
	"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
options="!check" # unit tests fail

subpackages="$pkgname-pyc"
source="
	https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz

	elf_diff
	"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD" pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
	install -Dm755 "$srcdir"/elf_diff "$pkgdir"/usr/bin/elf_diff
}

sha512sums="
db9f5b7a0ea2b79d6b2a1829d21fa5b0b2d2249f0603d357fbe4c309dc0dd9b500ffc30354d342d08477e41b06e36c962772fce239be84126327028a24ed961c  elf_diff-0.6.0.tar.gz
1ca2c8c7325f78df0d4033fe7cc8ed2e1da2716e4407b10fbcdf38cededcd1113dcc7a74b1816dff84103119c894dd499b061cf9936f2ff18eebef632b494617  elf_diff
"
